package com.danskin.wechat.service;

import java.util.List;

import com.danskin.wechat.entity.CustOrderDetail;
import com.danskin.wechat.entity.CustOrderPayment;
import com.danskin.wechat.entity.CustOrderRecord;
import com.danskin.wechat.entity.WxMediaPlatform;
import com.danskin.wechat.util.Page;
import com.danskin.wechat.vo.CustOrderRecordVo;

public interface CustOrderRecordService {

	CustOrderRecord findCustOrderRecord(String appId, String openId, String orderNo);

	List<CustOrderDetail> queryCustOrderDetail(String orderNo);
	
	/**
	 * 根据年份和CustEx查询   年度使用金额
	 * @param record
	 * @return
	 */
	Double selectPayAmountByYear(CustOrderRecord record);

	/**
	 * 保存会员消费记录
	 * @param mpId
	 * @param order
	 * @param detailList
	 * @param paymentList
	 * @return
	 */
	int saveCustOrderRecord(WxMediaPlatform mp, CustOrderRecord order, List<CustOrderDetail> detailList,
			List<CustOrderPayment> paymentList)throws  Exception;
	/**
	 * 分页查询会员消费记录
	 * @param page
	 * @return
	 */
	List<CustOrderRecord> listPageCustOrderRecordByOpenId(Page page);

	/**
	 * 查询会员单个订单信息
	 * @param orderId
	 * @param openId
	 * @return
	 */
	CustOrderRecord queryCustOrderRecord(int orderId, String openId); 
	/**
	 * 查询会员单个订单信息
	 * @param orderId
	 * @param openId
	 * @return
	 */
	CustOrderRecordVo queryCustOrderRecordVo(int orderId, String openId); 
}
